package com.wans.guli.auth.feign;

import com.wans.guli.auth.vo.oauth.OAuthAccessParam;
import com.wans.guli.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "guli-integration", path = "/guli-integration")
public interface IntegrationFeignClient {
    /**
     * 发送验证码
     *
     * @param phone 手机号
     * @param code  验证码
     * @return 验证码发送结果
     */
    @GetMapping("/sms/sendCode")
    @ResponseBody
    R sendCode(@RequestParam("phone") String phone, @RequestParam("code") String code);


    /**
     * 获取令牌
     *
     * @param param 令牌参数
     * @return 令牌结果
     */
    @PostMapping("/oauth/token")
    @ResponseBody
    R getAccessToken(@RequestBody OAuthAccessParam param);
}
